import {requireAuth} from 'app/utils'

export default {
  path: '/',
  indexRoute: {
    getComponent(state, cb){
      require.ensure([], require => cb(null, require('./index').default))
  } 
},
  childRoutes: [
    {
      path: 'platformData',
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./PlatformData').default))
      },
       onEnter: requireAuth,
    },
    {
      path: 'platformInfo',
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./PlatformInfo').default))
      },
       onEnter: requireAuth,
    },
    {
      path: 'securityProtection',
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./SecurityProtection').default))
      },
      // onEnter: requireAuth,
    },
    {
      path: 'novice',
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./Novice').default))
      },
      // onEnter: requireAuth,
    },
    {
      path: 'aboutUs',
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./AboutUs').default))
      },
      // onEnter: requireAuth,
    },
    {
      path: 'helpCenter',
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./HelpCenter').default))
      },
      // onEnter: requireAuth,
    },
    {
      path: 'contactUs',
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./ContactUs').default))
      },
      // onEnter: requireAuth,
    },
    {
      path: 'announcementList', //公告列表
      getComponent(state, cb){
        require.ensure([], require => cb(null, require('./AnnouncementList').default))
      },
      // onEnter: requireAuth,
    },
    
    
  ]
}